home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / arcers / tar316.zip / ZIPGUTS.H < prev    next >
Text File  |  1994-06-15  |  2KB  |  84 lines

  1. #ifndef __ARGS__
  2. #    include "modern.h"
  3. #endif
  4. #define OF __ARGS__
  5. #ifndef WSIZE
  6. #    include "zipdefs.h"
  7. #endif
  8. #ifndef zfree
  9. #    include "zalloc.h"
  10. #endif
  11.  
  12. #define MIN_MATCH  3
  13. #define MAX_MATCH  258
  14. /* The minimum and maximum match lengths */
  15.  
  16. #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
  17. /* Minimum amount of lookahead, except at the end of the input file.
  18.    See deflate.c for comments about the MIN_MATCH+1. */
  19.  
  20. #define MAX_DIST  (WSIZE-MIN_LOOKAHEAD)
  21. /* In order to simplify the code, particularly on 16 bit machines, match
  22.    distances are limited to MAX_DIST instead of WSIZE. */
  23.  
  24. extern int deflate_level;
  25. extern ulg compressed_len;
  26. extern void (*ziputbyte)__ARGS__((int));
  27. #define putbyte(b) (*ziputbyte)(b)
  28. #define putword(x) bi_putsh(x)
  29.  
  30. #ifdef __OS2__
  31. #  ifndef OS2
  32. #    define OS2
  33. #   endif
  34. #endif
  35. /* Diagnostic functions */
  36. #ifdef DEBUG
  37. # ifdef MSDOS
  38. #  undef  stderr
  39. #  define stderr stdout
  40. # endif
  41. # ifdef OS2
  42. #  undef  stderr
  43. #  define stderr stdout
  44. # endif
  45. #  define Assert(cond,msg) {if(!(cond)) error(msg);}
  46. #  define Trace(x) fprintf x
  47. #  define Tracev(x) {if (verbose) fprintf x ;}
  48. #  define Tracevv(x) {if (verbose>1) fprintf x ;}
  49. #  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
  50. #  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
  51. #else
  52. #  define Assert(cond,msg)
  53. #  define Trace(x)
  54. #  define Tracev(x)
  55. #  define Tracevv(x)
  56. #  define Tracec(c,x)
  57. #  define Tracecv(c,x)
  58. #endif
  59.  
  60.         /* in deflate.c */
  61. #ifdef DYN_ALLOC
  62. int  lm_alloc OF((void));
  63. void lm_free  OF((void));
  64. #endif
  65. int lm_init OF((void));
  66. int fast_deflate OF((char*, unsigned));
  67. int lazy_deflate OF((char*, unsigned));
  68.  
  69.         /* in trees.c */
  70. #ifdef DYN_ALLOC
  71. int  ct_alloc OF((void));
  72. void ct_free  OF((void));
  73. #endif
  74. int  ct_init  OF((void));
  75. int  ct_tally OF((int dist, int lc));
  76. ulg  flush_block OF((char far *buf, ulg stored_len, int eof));
  77.  
  78.         /* in bits.c */
  79. void bi_init    OF((void));
  80. void send_bits  OF((unsigned value, int length));
  81. void bi_windup  OF((void));
  82. void bi_putsh   OF((unsigned));
  83. void copy_block OF((char far *buf, unsigned len, int header));
  84.